package com.tedu.util;

import java.util.Random;

public class CheckCode {

    public static String getCode(int n){
        String str = "ABCDEFHIJKLMNOPQRSTUVWXYZ0123456789abcdefhijklmnopqrstuvwxyz";
        String code = "";
        Random r = new Random();
        for(int i=0;i<n;i++){
            int index = r.nextInt(str.length());
            code = code + str.charAt(index);
        }
        return code;
    }

    public void println(){
        System.out.println("欢迎使用XXX的代码！！！！");
    }


}
